@extends('layouts.goods')
@section('content')
<body>
<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.config.js"> </script>
<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.all.min.js"> </script>
<div class="page-container">
	<form action="/business/{{$data[0]->goods_id}}" method="post" class="form form-horizontal" id="form-article-add" enctype="multipart/form-data">
		{{ csrf_field() }}
		{{ method_field('PUT') }}  
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">产品标题：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="{{$data[0]->goods_name}}" placeholder="" id="" name="goods_name">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">选择分类：</label>
			<div class="formControls col-xs-8 col-sm-9"> <span class="select-box">
				<select class="select" name="cat_id">
					@foreach($type as $v)
					@if($v->parentid !== 0)
					<option value="{{$v->catid}}" @if($data[0]->cat_id == $v->catid)selected @endif>{{ $v->catname }}</option>
					@endif
					@endforeach
				</select>
				</span> 
			</div>
		</div>

		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">选择店铺：</label>
			<div class="formControls col-xs-8 col-sm-9"> <span class="select-box">
				<select class="select" name="shop_id" >
					@foreach($shop as $v)
					<option value="{{$v->shop_id}}" @if($data[0]->shop_id == $v->shop_id)selected @endif>{{ $v->store_name }}</option>
					@endforeach
				</select>
				</span> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">库存：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="{{$data[0]->number}}" placeholder="" id="" name="number">
			</div>
		</div>
				
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">产品展示价格：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" name="shop_price" id="" placeholder="" value="{{$data[0]->shop_price}}" class="input-text" style="width:90%">
				元</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">市场价格：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" name="goods_price" id="" placeholder="" value="{{$data[0]->goods_price}}" class="input-text" style="width:90%">
				元</div>
		</div>
	
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">产品详情:</label>
			<div class="formControls col-xs-8 col-sm-9">
				<script id="editor" name="goods_detail" type="text/plain" style="width:830px;height:300px;">
	            	<?php echo strip_tags($data[0]->goods_detail);?>
	            </script>
	            <script type="text/javascript">
	                var ue = UE.getEditor('editor');
	        	</script>
				<!-- <input type="text" name="goods_detail" id="" placeholder="" value="{{$data[0]->goods_detail}}" class="input-text" style="width:90%"> -->
			</div>

		</div>
		<input type="hidden" class="input-sm form-control mask-phone" name='oldpicname' value="{{ $data[0]->pic }}">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">产品颜色:</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" name="color" id="" placeholder="" value="{{$data[0]->color}}" class="input-text" style="width:90%"><span style="font-size:10px">多种颜色用,隔开</span>
			</div>

		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">产品尺寸:</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" name="size" id="" placeholder="" value="{{$data[0]->size}}" class="input-text" style="width:90%"><span style="font-size:10px">多种尺寸用,隔开</span>
			</div>
	
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">缩略图：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="file" name="pic">
			</div>
		</div>

		<div class="row cl" style="text-align:center;">
			<input type="submit">
		</div>
		
		
	</form>
</div>
@endsection

